package com.wgu.modules.repository;

import com.wgu.entity.AuthorInfo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.Optional;

/**
 * @Author: w
 * @Date: 2019/7/4 9:10
 * @Version 1.0
 */
@Repository
public interface AuthorRepository extends JpaRepository<AuthorInfo,Long>{
    /**
     * 通过作者名称查询作者
     * @param name
     * @return
     */
    Optional<AuthorInfo> findByAuthName(String name);
}
